Change in openvpn[master]: Add test for static-challenge concatenation option
A message that is not in the archive (sent off-list or not yet received): gerrit.1718418288000.I41f6c1f7acb58f30fc4db0e32505018f64fcad28@...2715...
Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/666?usp=email
to review the following change.
Change subject: Add test for static-challenge concatenation option
......................................................................
Add test for static-challenge concatenation option
Change-Id: I41f6c1f7acb58f30fc4db0e32505018f64fcad28
---
M tests/unit_tests/openvpn/test_user_pass.c
1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/66/666/1
tests/unit_tests/openvpn/test_user_pass.c +19 -1
@@ -311,7 +311,25 @@reset_user_pass (&up); - flags |=GET_USER_PASS_INLINE_CREDS ; + flags |=GET_USER_PASS_STATIC_CHALLENGE_CONCAT ; + +expect_string (query_user_exec_builtin, query_user[i].prompt,"Enter UT Username:" ); +will_return (query_user_exec_builtin,"c1user" ); +expect_string (query_user_exec_builtin, query_user[i].prompt,"Enter UT Password:" ); +will_return (query_user_exec_builtin,"c1password" ); +will_return (query_user_exec_builtin, true); +expect_string (query_user_exec_builtin, query_user[i].prompt,"CHALLENGE: Please enter token PIN" ); +will_return (query_user_exec_builtin,"0123456" ); +will_return (query_user_exec_builtin, true); +assert_true (get_user_pass_cr (&up,NULL ,"UT" , flags, challenge)); +assert_true (up.defined); +assert_string_equal (up.username,"c1user" ); +/* password and response concatenated */ +assert_string_equal (up.password,"c1password0123456" ); + +reset_user_pass (&up); + + flags =GET_USER_PASS_STATIC_CHALLENGE |GET_USER_PASS_INLINE_CREDS ;/*FIXME: query_user_exec() called even though nothing queued */ will_return (query_user_exec_builtin, true);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/666?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I41f6c1f7acb58f30fc4db0e32505018f64fcad28
Gerrit-Change-Number: 666
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, selvanair.
plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/666?usp=email )
Change subject: Add test for static-challenge concatenation option
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/666?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I41f6c1f7acb58f30fc4db0e32505018f64fcad28
Gerrit-Change-Number: 666
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: selvanair <[email protected]...>
Gerrit-Comment-Date: Tue, 18 Jun 2024 12:10:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: selvanair.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/666?usp=email )
Change subject: Add test for static-challenge concatenation option
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/666?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I41f6c1f7acb58f30fc4db0e32505018f64fcad28
Gerrit-Change-Number: 666
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: selvanair <[email protected]...>
Gerrit-Comment-Date: Tue, 09 Jul 2024 16:16:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH 1/1 Add test for static-challenge concatenation option
In reply to a message not in the archiveFrom: Selva Nair <[email protected]...>
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/I41f6c1f7acb58f30fc4db0e32505018f64fcad28
This mail reflects revision 1 of this Change.
Signed-off-by line for the author was added as per our policy.
Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]...>
Frank Lichtenheld <[email protected]...>
tests/unit_tests/openvpn/test_user_pass.c +19 -1
@@ -311,7 +311,25 @@reset_user_pass (&up); - flags |=GET_USER_PASS_INLINE_CREDS ; + flags |=GET_USER_PASS_STATIC_CHALLENGE_CONCAT ; + +expect_string (query_user_exec_builtin, query_user[i].prompt,"Enter UT Username:" ); +will_return (query_user_exec_builtin,"c1user" ); +expect_string (query_user_exec_builtin, query_user[i].prompt,"Enter UT Password:" ); +will_return (query_user_exec_builtin,"c1password" ); +will_return (query_user_exec_builtin, true); +expect_string (query_user_exec_builtin, query_user[i].prompt,"CHALLENGE: Please enter token PIN" ); +will_return (query_user_exec_builtin,"0123456" ); +will_return (query_user_exec_builtin, true); +assert_true (get_user_pass_cr (&up,NULL ,"UT" , flags, challenge)); +assert_true (up.defined); +assert_string_equal (up.username,"c1user" ); +/* password and response concatenated */ +assert_string_equal (up.password,"c1password0123456" ); + +reset_user_pass (&up); + + flags =GET_USER_PASS_STATIC_CHALLENGE |GET_USER_PASS_INLINE_CREDS ;/*FIXME: query_user_exec() called even though nothing queued */ will_return (query_user_exec_builtin, true);
[Openvpn-devel] [PATCH applied] Re: Add test for static-challenge concatenation option
Tests are always good :-) - and this expect_string()/will_return() stuff looks outright magic... cool stuff.
Your patch has been applied to the master branch.
commit bb8f193615032f5a7dd3ae9230e2edfb92b70ab7
Author: Selva Nair Date: Fri Aug 30 10:18:24 2024 -0400
Add test for static-challenge concatenation option
Signed-off-by: Selva Nair <[email protected]...>
Acked-by: Arne Schwabe <[email protected]...>
Acked-by: Frank Lichtenheld <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg29054.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/666?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld, Code-Review+2 by plaisthos
Change subject: Add test for static-challenge concatenation option
......................................................................
Add test for static-challenge concatenation option
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg29054.html
---
M tests/unit_tests/openvpn/test_user_pass.c
1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/66/666/2
tests/unit_tests/openvpn/test_user_pass.c +19 -1
@@ -326,7 +326,25 @@reset_user_pass (&up); - flags |=GET_USER_PASS_INLINE_CREDS ; + flags |=GET_USER_PASS_STATIC_CHALLENGE_CONCAT ; + +expect_string (query_user_exec_builtin, query_user[i].prompt,"Enter UT Username:" ); +will_return (query_user_exec_builtin,"c1user" ); +expect_string (query_user_exec_builtin, query_user[i].prompt,"Enter UT Password:" ); +will_return (query_user_exec_builtin,"c1password" ); +will_return (query_user_exec_builtin, true); +expect_string (query_user_exec_builtin, query_user[i].prompt,"CHALLENGE: Please enter token PIN" ); +will_return (query_user_exec_builtin,"0123456" ); +will_return (query_user_exec_builtin, true); +assert_true (get_user_pass_cr (&up,NULL ,"UT" , flags, challenge)); +assert_true (up.defined); +assert_string_equal (up.username,"c1user" ); +/* password and response concatenated */ +assert_string_equal (up.password,"c1password0123456" ); + +reset_user_pass (&up); + + flags =GET_USER_PASS_STATIC_CHALLENGE |GET_USER_PASS_INLINE_CREDS ;/*FIXME: query_user_exec() called even though nothing queued */ will_return (query_user_exec_builtin, true);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/666?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I41f6c1f7acb58f30fc4db0e32505018f64fcad28
Gerrit-Change-Number: 666
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/666?usp=email )
Change subject: Add test for static-challenge concatenation option
......................................................................
Add test for static-challenge concatenation option
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg29054.html
---
M tests/unit_tests/openvpn/test_user_pass.c
1 file changed, 19 insertions(+), 1 deletion(-)
tests/unit_tests/openvpn/test_user_pass.c +19 -1
@@ -326,7 +326,25 @@reset_user_pass (&up); - flags |=GET_USER_PASS_INLINE_CREDS ; + flags |=GET_USER_PASS_STATIC_CHALLENGE_CONCAT ; + +expect_string (query_user_exec_builtin, query_user[i].prompt,"Enter UT Username:" ); +will_return (query_user_exec_builtin,"c1user" ); +expect_string (query_user_exec_builtin, query_user[i].prompt,"Enter UT Password:" ); +will_return (query_user_exec_builtin,"c1password" ); +will_return (query_user_exec_builtin, true); +expect_string (query_user_exec_builtin, query_user[i].prompt,"CHALLENGE: Please enter token PIN" ); +will_return (query_user_exec_builtin,"0123456" ); +will_return (query_user_exec_builtin, true); +assert_true (get_user_pass_cr (&up,NULL ,"UT" , flags, challenge)); +assert_true (up.defined); +assert_string_equal (up.username,"c1user" ); +/* password and response concatenated */ +assert_string_equal (up.password,"c1password0123456" ); + +reset_user_pass (&up); + + flags =GET_USER_PASS_STATIC_CHALLENGE |GET_USER_PASS_INLINE_CREDS ;/*FIXME: query_user_exec() called even though nothing queued */ will_return (query_user_exec_builtin, true);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/666?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I41f6c1f7acb58f30fc4db0e32505018f64fcad28
Gerrit-Change-Number: 666
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged